Skip to content

[NPU] Reduce test logs#36904

Open
alexandruenache1111 wants to merge 19 commits into
openvinotoolkit:masterfrom
alexandruenache1111:reduce_logs
Open

[NPU] Reduce test logs#36904
alexandruenache1111 wants to merge 19 commits into
openvinotoolkit:masterfrom
alexandruenache1111:reduce_logs

Conversation

@alexandruenache1111

@alexandruenache1111 alexandruenache1111 commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Details:

Trying to reduce the printed logs as much as possible.
Exception: the tests from src/plugins/intel_npu/tests/functional/behavior/dynamic_host_pipeline/infer_with_host_compile.hpp cannot be modified since they rely heavily on log asserts. I am unable to suppress compiler warnings while keeping intact the test logic.

Added LogLevelScope to solve the issue, where while calling compile_model() twice sequentially, the second call inherits the log level set in the first one. This solution still does not address the thread safety problem.

Tickets:

  • C-174499

AI Assistance:

  • AI assistance used: no / yes
  • If yes, summarize how AI was used and what human validation was performed (build/tests/manual checks).

@alexandruenache1111 alexandruenache1111 self-assigned this Jul 15, 2026
@alexandruenache1111
alexandruenache1111 requested a review from a team as a code owner July 15, 2026 14:29
@alexandruenache1111
alexandruenache1111 requested a review from a team as a code owner July 15, 2026 14:29
@github-actions github-actions Bot added the category: NPU OpenVINO NPU plugin label Jul 15, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR reduces log noise in Intel NPU plugin functional/behavior tests and ensures per-call ov::log::level passed via compile_model/import_model/query_model does not permanently alter the plugin/global logger state.

Changes:

  • Scoped per-call log-level handling in the NPU plugin via an RAII guard (Plugin::LogLevelScope) to restore previous logger levels after API calls.
  • Lowered default log verbosity in several NPU test suites (e.g., instantiation configs set to ERR) and adjusted a few tests to avoid flooding compilation logs.
  • Added/updated a regression test to ensure per-call log level does not contaminate subsequent compiles.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/plugins/intel_npu/tests/functional/internal/compiler_adapter/zero_graph.hpp Saves/restores global NPU logger level around test fixture to suppress logs.
src/plugins/intel_npu/tests/functional/behavior/ov_plugin/core_integration.hpp Adds regression test for per-call log-level contamination; uses log callback guards.
src/plugins/intel_npu/tests/functional/behavior/ov_plugin/core_integration.cpp Lowers instantiated test configuration log level to ERR.
src/plugins/intel_npu/tests/functional/behavior/ov_infer_request/infer_request_run.hpp Moves debug log-level enabling to avoid noisy compilation logs; minor formatting.
src/plugins/intel_npu/tests/functional/behavior/ov_infer_request/infer_request_dynamic.cpp Removes a stray leading comment line.
src/plugins/intel_npu/tests/functional/behavior/compiled_model/property.hpp Adds global logger level save/restore in fixture; adds logger guards in tests; lowers some log levels.
src/plugins/intel_npu/tests/functional/behavior/compiled_model/compatibility_string.hpp Adds global logger level save/restore in fixture; formatting of compile calls.
src/plugins/intel_npu/src/plugin/src/plugin.cpp Introduces read_log_level() helper and Plugin::LogLevelScope usage for per-call scoping.
src/plugins/intel_npu/src/plugin/include/plugin.hpp Declares Plugin::LogLevelScope (RAII) and stores previous levels via std::optional.

Comment thread src/plugins/intel_npu/tests/functional/internal/compiler_adapter/zero_graph.hpp Outdated
Comment thread src/plugins/intel_npu/tests/functional/behavior/ov_plugin/core_integration.hpp Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 5 comments.

Comment thread src/plugins/intel_npu/src/plugin/src/plugin.cpp
Comment thread src/plugins/intel_npu/src/plugin/src/plugin.cpp
Comment thread src/plugins/intel_npu/tests/functional/behavior/ov_plugin/core_integration.hpp Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: NPU OpenVINO NPU plugin

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants